<?php
/**
 * Created by PhpStorm.
 * User: mayn
 * Date: 2020/9/1
 * Time: 18:15
 */

$redis = new \Redis();
$con = $redis->connect('127.0.0.1','6379',60);
if(!$con) die('redis连接失败');
$redis->select(7);
$redis->set('11','1111');
/*$key = "...";
$value = "...";
$expire = 3;
var_dump($redis->set($key, $value, ["NX", "EX" => $expire]));*/